package com.jt.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dc
 * @Classname MsgController
 * @Date 2020/2/14 10:39
 */
@RestController
public class MsgController {

    /**动态获取端口号*/
    @Value("${server.port}")
    private Integer port;

    @RequestMapping("/getMsg")
    public String getMsg(){
        return "当前访问的服务器端口:"+port;
    }

}
